#ifndef CHESS_H
#define CHESS_H

#include "Position.h"
#include "MoveGenerator.h"

class ChessBoard
{
public://uncomment this if you want to use the Position directly without modifying this class
	//DO NOT MODIFY THE NEXT SEVEN LINES
	unsigned int history[9];//for threefold repetition testing
	Position myboard;
	char movesToDraw;
	static MoveGenerator myGen;
	std::vector<Move>* legalNextMoves;
	//DO NOT MODIFY THE SIX PRECEDING LINES
	//additional member variables below this line, if needed

	//DO NOT MODIFY THE NEXT 17 LINES
public:
	void getCastles(bool mycastles[4]);
	unsigned char getPiece(char row, char col);
	short getMoves(Move* &moves);
	bool minPlayerTurn();
	bool inCheck();
	bool gameOver(bool& draw, bool& minPlayerWin);
	ChessBoard* move(Move* move);
	void freeMoves(Move* moves);
	ChessBoard();
	ChessBoard(ChessBoard* tocopy);
	ChessBoard(const ChessBoard& tocopy);
	ChessBoard& operator=(const ChessBoard& tocopy);
	void printState();
    char* getFen();
	~ChessBoard();
	//DO NOT MODIFY THE PREVIOUS 16 LINES
	//additional member functions below this line, if needed

};

#endif
